package xin.zhiyin.仓库.书;

import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;
import xin.zhiyin.实体.书章节内容图片Entity;

import java.util.List;

public interface 书章节内容图片Repository extends JpaRepositoryImplementation<书章节内容图片Entity,Long> {
    List<书章节内容图片Entity> findByChapterContentId(Long bookId);
    书章节内容图片Entity findByUrl(String url);
    @Modifying
    @Transactional
    @Query("delete from 书章节内容图片Entity s where s.id in (?1)")
    void 根据Ids批量删除(List ids);
    @Modifying
    @Transactional
    @Query("delete from 书章节内容图片Entity s where s.chapterContentId in (?1)")
    void 根据ChapterContentIds批量删除(List chapterContentIds);
    @Modifying
    @Transactional
    @Query("delete from 书章节内容图片Entity s where s.url in (?1)")
    void 根据urls批量删除(List urls);
}
